package com.santu.edu.supporter.biz.order.service;

import com.santu.edu.supporter.biz.order.pojo.dto.OrderDTO;
import com.santu.edu.supporter.biz.order.pojo.enums.OrderStatusEnum;
import com.santu.edu.supporter.biz.order.pojo.params.OrderAddParam;
import com.santu.edu.supporter.biz.order.pojo.params.OrderUpdateParam;
import com.santu.edu.supporter.biz.pay.pojo.dto.WxChatPayDTO;
import com.santu.edu.supporter.util.PageData;

/**
 * @author luoyaoqi
 * @createTime 2024/3/18
 * @description
 */
public interface OrderService {

    /**
     * 添加订单
     *
     * @param addParam
     * @return
     */
    WxChatPayDTO addOrder(OrderAddParam addParam);

    /**
     * 更新订单
     *
     * @param updateParam
     * @return
     */
    Boolean updateOrder(OrderUpdateParam updateParam);

    /**
     * 删除订单
     *
     * @param orderId
     * @return
     */
    Boolean removeOrder(String orderId);

    /**
     * 获取订单列表
     *
     * @param orderStatus
     * @param page
     * @param size
     * @return
     */
    PageData<OrderDTO> getOrderList(Integer orderStatus, Integer page, Integer size);

    /**
     * 修改订单状态
     * @param orderId
     * @param newStatus
     * @param oldStatus
     */
    void updateOrderStatus(String orderId, OrderStatusEnum newStatus,OrderStatusEnum oldStatus);


    /**
     * 根据订单id获取订单
     * @param orderId
     * @return
     */
    OrderDTO getOrderById(String orderId);
}
